package com.guandi.geekbrowser.secondary.service.impl;

import com.guandi.geekbrowser.secondary.entity.ForumUser;
import com.guandi.geekbrowser.secondary.repository.ForumUserRepository;
import com.guandi.geekbrowser.secondary.service.ForumUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ForumUserImpl implements ForumUserService {
    @Autowired
    private ForumUserRepository forumUserRepository;
    @Override
    public ForumUser findByUsernameAndPassword(String name, String password) {
        return forumUserRepository.findByUsernameAndPassword(name, password);
    }

    @Override
    public ForumUser findByUsername(String name) {
        return forumUserRepository.findByUsername(name);
    }

    @Override
    public ForumUser findByUid(Integer uid) {
        return forumUserRepository.findByUid(uid);
    }
}
